package tech.xs.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tech.xs.dao.ClaimVoucherDetailDao;
import tech.xs.pojo.ClaimVoucherDetail;
import tech.xs.service.ClaimVoucherDetailService;
@Service
public class ClaimVoucherDetailServiceImpl implements ClaimVoucherDetailService {
	@Autowired
	private ClaimVoucherDetailDao claimVoucherDetailDao;
	@Override
	public boolean save(List<ClaimVoucherDetail> detailList) {
		boolean flag = false;
		if(detailList.size()!=0){
			for (ClaimVoucherDetail detail : detailList) {
				claimVoucherDetailDao.save(detail);
				flag = true;
			}
		}
		return flag;
	}

	@Override
	public boolean deleteDetail(ClaimVoucherDetail detail) {
		boolean flag = false;
		claimVoucherDetailDao.deleteDetail(detail);
		flag = true;
		return flag;
	}

	@Override
	public ClaimVoucherDetail findDetailById(Long id) {
		// TODO Auto-generated method stub
		return claimVoucherDetailDao.findDetailById(id);
	}

}
